#ifndef BALL_H
#define BALL_H

#include <QGraphicsItem>

#include "place.h"

class Ball : public QGraphicsItem
{
    Place* _lastPlace;
    Place* _prevPlace;
    bool _lastAvailable;

    void makeStep();
    void cancelStep();
public:
    Ball(Place *place);

    virtual QRectF boundingRect() const;
    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

protected:
    virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);

};

#endif // BALL_H
